﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using mock_ehr_lib.Data;

namespace mock_ehr_lib.tests
{
    [TestClass]
    public class UserRepository
    {
        private JsonUserRepository _jsonUserRepository;

        [TestInitialize]
        public void Initialize()
        {
            _jsonUserRepository = new JsonUserRepository("Users.js");
        }

        [TestMethod]
        public void LoadsUsersFromJson()
        {
            var users = _jsonUserRepository.GetAllUsers();
            Assert.AreEqual(3, users.Count());
        }
    }
}
